<template>
  <view>
  	<swiper class="screen-swiper bg-white" :class="dotStyle?'square-dot':'round-dot'" :indicator-dots="true" indicator-color="#8799a3"
  	 indicator-active-color="#0081ff">
  	  <swiper-item class="" v-for="(itemList, index) in iconSwiperList" :key="index">
  	  	<view class="cu-list grid col-4 no-border">
  	      <view class="cu-item" v-for="(item,index) in itemList" :key="index" @tap.stop="onIconTap" :data-name="item.name">
  	        <view :class="['icon-' + item.icon,'text-' + item.color]">
  	          <!-- <view class="cu-tag badge" v-if="item.badge!=0">
  	            <block v-if="item.badge!=1">{{item.badge>99?'99+':item.badge}}</block>
  	          </view> -->
  	        </view>
  	        <text>{{item.name}}</text>
  	      </view>
  	    </view>
  	  </swiper-item>
  	</swiper>
  </view>
</template>

<script>
  export default {
  	props: {
      iconSwiperList: Array,
      dotStyle: Boolean
    },
    methods: {
      onIconTap (e) {
        const name = e.currentTarget.dataset.name
        uni.navigateTo({
          url: '/pages/more/more?name=' + name
        })
      }
    }
  }
</script>

<style>
</style>
